class ErrorMessage {
  static DataBaseError = new ErrorMessage(-100, '数据库相关操作错误'); // -100
  static UserError = new ErrorMessage(-200, '用户相关操作错误'); // -200
  static UserNotFoundError = new ErrorMessage(-201, '用户不存在'); // -201
  static PasswordError = new ErrorMessage(-202, '密码错误'); // -202
  static AccountExistError = new ErrorMessage(-203, '用户名已存在'); // -203
  static TokenError = new ErrorMessage(-300, '登录令牌相关错误'); // -300
  static TokenNotFoundError = new ErrorMessage(-301, '登录令牌为空');
  static TokenExpiredError = new ErrorMessage(-302, '登录令牌过期');
  static PermissionError = new ErrorMessage(-400, '权限相关错误'); // -400
  static PermissionNotAllowedError = new ErrorMessage(-401, '权限不足'); // -401

  /**
   * 错误响应枚举
   * @param {number} code 错误码
   * @param {string} message 错误信息
   */
  constructor(code, message) {
    this.tag = 'custom';
    this.code = code;
    this.message = message;
  }
}
exports.ErrorMessage = ErrorMessage;
